cmake_minimum_required(VERSION 3.26)
project(NetShelf C)

set(CMAKE_C_STANDARD 99)
#添加头文件依赖
include_directories(
        .
        lib
        lib/at
        lib/ltv
        lib/store
        lib/tools
        lib/crc
        lib/databus
        lib/emodbus
        lib/lua
        lib/lua/inc
        free-type/include
        free-type/include/freetype
)
#可执行
add_executable(
        NetShelf
        main.c
        lib/ltv/ltv.c
        lib/ltv/cmd.c
        lib/ltv/validate.c
        lib/store/store.c
        lib/tools/string_operation.c
        lib/store/memory.c
        lib/tools/screen_emulate.c
        lib/at/at.c
        lib/crc/crc16.c
        lib/databus/databus.c

        lib/emodbus/emodbus.c
        lib/emodbus/emodbus_crc.c
        lib/emodbus/emodbus_private_func.c
        #lua
        lib/lua/src/lapi.c
        lib/lua/src/lauxlib.c
        lib/lua/src/lbaselib.c
        lib/lua/src/lcode.c
        lib/lua/src/lcorolib.c
        lib/lua/src/lctype.c
        lib/lua/src/ldblib.c
        lib/lua/src/ldebug.c
        lib/lua/src/ldo.c
        lib/lua/src/ldump.c
        lib/lua/src/lfunc.c
        lib/lua/src/lgc.c
        lib/lua/src/linit.c
        lib/lua/src/liolib.c
        lib/lua/src/llex.c
        lib/lua/src/lmathlib.c
        lib/lua/src/lmem.c
        lib/lua/src/loadlib.c
        lib/lua/src/lobject.c
        lib/lua/src/lopcodes.c
        lib/lua/src/loslib.c
        lib/lua/src/lparser.c
        lib/lua/src/lstate.c
        lib/lua/src/lstring.c
        lib/lua/src/lstrlib.c
        lib/lua/src/ltable.c
        lib/lua/src/ltablib.c
        lib/lua/src/ltm.c
#        lib/lua/src/luac.c
        lib/lua/src/lundump.c
        lib/lua/src/lutf8lib.c
        lib/lua/src/lvm.c
        lib/lua/src/lzio.c
        lib/lua/lua_terminal.c
        #lua扩展
        lib/lua/extern/latlib.c
        lib/lua/extern/lcrclib.c

        #free-type
        free-type/src/autofit/autofit.c
        free-type/src/bdf/bdf.c
        free-type/src/cff/cff.c
        free-type/src/base/ftbase.c
        free-type/src/base/ftsystem.c
        free-type/src/base/ftinit.c
        free-type/src/base/ftglyph.c
        free-type/src/base/ftbitmap.c
        free-type/src/base/ftdebug.c
        free-type/src/cache/ftcache.c
        free-type/src/gzip/ftgzip.c
        free-type/src/lzw/ftlzw.c
        free-type/src/pcf/pcf.c
        free-type/src/pfr/pfr.c
        free-type/src/psaux/psaux.c
        free-type/src/pshinter/pshinter.c
        free-type/src/psnames/psmodule.c
        free-type/src/raster/raster.c
        free-type/src/sfnt/sfnt.c
        free-type/src/smooth/smooth.c
        free-type/src/truetype/truetype.c
        free-type/src/type1/type1.c
        free-type/src/cid/type1cid.c
        free-type/src/type42/type42.c
        free-type/src/winfonts/winfnt.c


)
